package com.bird.thread.base.thread;

/**
 * @author sijunqiang
 * @data 2021/7/2 22:26
 * @description: 目的； 验证 Thread.currentThread()打印的是当前执行的线程引用。
 */
public class CurrentThread implements Runnable {

    public static void main(String[] args) {
        new CurrentThread().run();
        new Thread(new CurrentThread()).start();
        new Thread(new CurrentThread()).start();
    }


    @Override
    public void run() {
        System.out.println("当前执行线程名称：" + Thread.currentThread().getName());
    }
}
